OPC Studio User's Guide and Reference
OPC Wizard Demo Applications
Fundamentals > OPC Wizard Fundamentals > OPC Wizard Product Parts > OPC Wizard Demo Applications
In This Topic

OPC Wizard Demo Server

The OPC Wizard Demo Server is intended to show the various OPC Wizard capabilities in terms of OPC UA interfaces, and also the additional features such as different hosting modes, and OPC UA Administration user interface.

This functionality is not available under (or the text does not apply to) .NET 6+ development platform.

That is, the demo applications are shipped built for .NET Framework. Their source code is available in the Examples, and they can be built for .NET 6+ as well.

Host Environments

The demo server is provided in three hosting environments:

The OPC UA functionality provided, i.e. the information model and behavior of the OPC UA server, is always the same, independent of the hosting environment.

Note: In the Examples for OPC Wizard (available in source code), we also show the same demo server implemented as:

The console-hosted demo server outputs relevant events to the console (endpoint state changes, server start and stop events, and connections of disconnections of client sessions). The user can stop the server by pressing Ctrl+C.

The demo server hosted in Windows Forms application displays the state of the server endpoints, and information about connected client sessions on the main program form. On the system menu of the demo server (accessible through the icon in the upper left corner, or by pressing Alt+Space), there is an additional Administer OPC UA Application command made available by the OPC Wizard. Using this command, the user can managed the server instance certificate and the trusted certificates.

For the demo server hosted in Windows Service, the Launcher application provides icons to install and uninstall the service. After the service is installed, it can be started, restarted, or stopped using all available means in Windows, such as using the Services app, or with the "sc" or "net" commands. The name the service is "OpcWizardDemo".

Server Contents

The server contains folders and data variables that demonstrate different data types, access modes and kinds of behavior. They include:

Communicating with the Demo Server

When the OPC UA demo server is running, any OPC UA client can connect to it and read or subscribe to the value of the data variables in the server. When the OPC UA client is on the same computer, it can connect to "opc.tcp://localhost:48040/" to access this server; otherwise, replace the "localhost" in the endpoint URL by the name of the computer (host) on your network.

If the OPC UA Local Discovery Server (LDS) is installed on the computer where the server is running, the server will automatically register itself with the LDS and will thus become discoverable by OPC UA clients through the LDS. For this to work, the LDS must either accept unauthenticated registrations, or be configured to trust the server. For more information, see OPC UA LDS Integration. The use of the LDS is optional.

Use Connectivity Explorer as a Client

If you have the Connectivity Explorer application (e.g. if you have installed OPC Wizard using the OPC Studio Setup program, or obtained the Connectivity Explorer separately e.g. through ClickOnce deployment), you can use it to communicate with the OPC UA demo server as follows:

  1. Start the Connectivity Explorer application.
  2. In the Point Editor window, select Points (Composite) -> OPC Unified Architecture (Client-Server) Points -> Well-known -> opc.tcp://localhost:48040/ .
  3. Expand the selected node by clicking on the "+" mini-icon next to it, or by pressing + on the keyboard.
  4. Select a data variable of your choice in the list view (middle pane) of the Point Editor window.
  5. Double-click on the selected data variable node, or select the "Add Live Data Row" in the Actions pane, or press Enter on the keyboard.
  6. Observe the variable value in the Live Point Data window.

Use OpcCmd Utility as a Client

If you have the OpcCmd utility (e.g. if you have installed OPC Wizard using the OPC Studio Setup program, or obtained the OpcCmd separately e.g. through ClickOnce deployment), you can use it for verification of the created OPC UA server as follows:

  1. Start the OpcCmd utility.
  2. Enter the following command:

    uaClient subscribe opc.tcp://localhost:48040/ nsu=http://opclabs.com/OpcUA/Custom/Objects;s=DataVariable1
    

  3. Observe the variable value changes in the console output. The command will terminate automatically after 1 minute, or you can stop it by pressing X on the keyboard.
  4. You can vary the node Id of the data variable to observe different data variables.
  5. In order to obtain the node Ids of various data variables in the OPC Wizard demo server, enter the following command:

    uaClient browse opc.tcp://localhost:48040/ nsu=http://opclabs.com/OpcUA/Custom/Objects;s=Demo --BrowseParametersStandardName DataNodes --tree
    

    or

    uaClient browse opc.tcp://localhost:48040/ nsu=http://opclabs.com/OpcUA/Custom/Objects;s=Data --BrowseParametersStandardName DataNodes --tree
    

OPC UA Server in OpcCmd

The OpcCmd utility contains a built-in OPC UA server based on OPC Wizard, and the server contains the same nodes as the OPC Wizard Demo server. The basic way to run this build-in server is as follows:

  1. Start the OpcCmd utility.
  2. Enter the following command:

    uaServer start
    

  3. Work with the server by connecting OPC clients to it.
  4. You can stop the server by pressing X on the keyboard.

Security Notice

For simplicity in configuration, the OPC Wizard demo server exposes an insecure endpoint, and allows OPC UA connections without application authentication. Any production OPC UA server should, at least by default, disable the insecure endpoint. For more information, see Securing OPC Wizard Servers.

See Also